package routes

import (
	"bluebell/controllers"

	"github.com/gin-gonic/gin"
)

func addPosRouters(rg *gin.RouterGroup) {
	// 帖子分类
	rg.GET("/community", controllers.CommunityHandler)

	// 进入某个频道社区
	rg.GET("/community/:id", controllers.CommunityDetailHandler)

	// 创建帖子
	rg.POST("/post", controllers.CreatePostHandler)

	// 查看帖子详情
	rg.GET("/post/:id", controllers.GetPostDetailHandler)

	// 查看帖子列表：mysql直接查询
	rg.GET("/posts", controllers.GetPostListHandler)
	// 查看帖子列表2：按照redis ZSet存储结果，按照时间，分数进行排序
	rg.GET("/posts2", controllers.GetPostListHandler2)

	rg.GET("/post11/", controllers.GetSomePost)
}
